import '@/Frame/require.js'
export default {
  data() {
    return {

    }
  },
  methods: {
    getComponent: function(resolve) {
      return new Promise(function(resolve1, reject1) {
        resolve1({
          props: ['data'],
          data: function() {
            return {}
          },
          methods: {
            getComponent: function() {
              var data = this.data
              const vueCmpt = data.component
              return new Promise(function(resolve2, reject2) {
                require(['@/Views' + vueCmpt], function(component) {
                  resolve2(component)
                })
              })
            }
          },
          template: '<component :is="getComponent" :data="data"></component>'
        })
      })
    }
  }
}
